package com.itl.train.controller;

import com.itl.train.entity.Enterprise;
import com.itl.train.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 胡广
 * @date 2020-11-06
 * @since JDK1.8
 */
@RestController
@RequestMapping("enterprise")
public class EnterpriseController {

    @Autowired
    private EnterpriseService enterpriseService;



    @PostMapping("query")
    public List<Enterprise> query(@RequestBody Enterprise enterprise) {
        List<Enterprise> enterpriseList = enterpriseService.query(enterprise);
        return enterpriseList;
    }

}
